package com.example.util;

import java.util.Enumeration;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.HandlerExceptionResolver;
import org.springframework.web.servlet.ModelAndView;

import com.sun.tools.internal.ws.processor.model.Request;

public class myExceptionHander implements HandlerExceptionResolver  {

	@Override
	public ModelAndView resolveException(HttpServletRequest arg0, HttpServletResponse arg1, Object arg2,
			Exception arg3) {
		// TODO Auto-generated method stub
		Enumeration enu=arg0.getParameterNames();
		String param="e_id";
		String IdFlag="";
		while(enu.hasMoreElements()){
			String paraName=(String)enu.nextElement();
			if(param.equalsIgnoreCase(paraName)){
				IdFlag=arg0.getParameter(paraName);
				break;
			}
		}
		System.out.println("type:------"+IdFlag);
		System.out.println("捕获异常：-------------"+arg3);
		return null;
	}
	
}
